package com.example.invoicingsystem.service.impl;
import com.example.invoicingsystem.mapper.SaleMapper;
import com.example.invoicingsystem.pojo.Sale;
import com.example.invoicingsystem.service.SaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SaleServiceImpl implements SaleService {
	@Autowired
	private SaleMapper saleMapper;

	/**
	 * 查询用户全部结果
	 *
	 * @return
	 */
	@Override
	public List<Sale> selectAll() {
		return saleMapper.selectAll();
	}

	public List<Sale> select(Sale sale) {
		return saleMapper.select(sale);
	}

	public int insert(Sale sale) {
		return saleMapper.insert(sale);
	}
	public int update(Sale sale) {
		return saleMapper.updateByPrimaryKey(sale);
	}
	public int delete(Sale sale) {
		return saleMapper.deleteByPrimaryKey(sale);
	}

}
